#-*- coding: utf-8 -*-
#
import math
def gerar_cubos(N):
	for i in range (N):
		yield i ** 3
		
def predicado(s):
	return len(s) % 2
	
def f(x,y):
	return x + math.sqrt(y)
	
lista = filter(predicado, ['batata' , 'couve' , 'cebola', 'repolho'] )
print lista

print reduce(f,gerar_cubos(5))
